from flask import Flask
from flask_uploads import configure_uploads
from flask_uploads import UploadSet
from flask_uploads import IMAGES, ALL

# 头像和图标为图片类型
photos = UploadSet('photos', IMAGES)

icons = UploadSet('icons', IMAGES)

# 视频为所有类型
videos = UploadSet('videos', ALL)

men = UploadSet('men', ALL)

emo = UploadSet('emo', ALL)

action = UploadSet('action', ALL)


def init_upload(app: Flask):
    configure_uploads(app, photos)
    configure_uploads(app, icons)
    configure_uploads(app, (videos,))
    configure_uploads(app, (men,))
    configure_uploads(app, (emo,))
    configure_uploads(app, (action,))
